﻿@model SchoolCommunicationSystem.Models.ParentAndLearnerModels
@{
    ViewBag.Title = "ViewTeacherProfile";
    Layout = "~/Views/Shared/_ParentsLayout.cshtml";
}
@Scripts.Render("~/bundles/tablesorter")
@Scripts.Render("~/bundles/tablesorterpaging")
<script type="text/javascript">
    $(function () {

        $("table")
            .tablesorter({
                widthFixed: true, widgets: ['zebra']
            })
            .tablesorterPager({ container: $("#pagersorter") });
    });
</script>
<div id="page-heading">
    <h1>Thông Tin Liên Hệ</h1>
</div>
<div class="container">
    <div class="row">
        <div class="col-sm-12">
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <h4>Thông tin giáo viên</h4>
                </div>
                <div class="panel-body">
                    <h4 style="margin: 1px;">Học sinh: @Model.learnerName</h4>
                    <h4 style="margin: 1px;">Lớp: @Model.className</h4>
                    <h4 style="margin: 1px;">Giáo viên chủ nhiệm: @Model.homeroomTeacher.teacherName</h4>
                    <h4 style="margin: 1px;">Năm học: @Model.schoolYearName</h4>
                    <br />
                    <div class="module_contentresult">
                        <table class="tablesorter">
                            <thead>
                                <tr>
                                    <th>Môn học</th>
                                    <th>Giáo viên</th>
                                    <th>Giới tính</th>
                                    <th>Số điện thoại</th>
                                    <th>Địa chỉ</th>
                                    <th>Gửi tin nhắn</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>Chủ nhiệm</td>
                                    <td>@Model.homeroomTeacher.teacherName</td>
                                    @if (Model.homeroomTeacher.gender == "M")
                                    {
                                        <td>Nam</td>
                                    }
                                    else
                                    {
                                        <td>Nữ</td>
                                    }
                                    <td>@Model.homeroomTeacher.mobile</td>
                                    <td>@Model.homeroomTeacher.address</td>
                                    @if (Model.homeroomTeacher.userID.HasValue)
                                    {
                                        <td>@Html.ActionLink((string)Model.homeroomTeacher.teacherName,
                                                             "Create", "PrivateMessage",
                                                             new { id = Model.homeroomTeacher.userID }, new { a = "" })</td>
                                    }
                                    else
                                    {
                                        <td>GV chưa có tài khoản</td>
                                    }
                                </tr>
                                @foreach (var item in Model.teachingAssignment)
                                {
                                    <tr>
                                        <td>@item.Subject.subjectName</td>
                                        <td>@item.Teacher.teacherName</td>
                                        @if (item.Teacher.gender == "M")
                                        {
                                            <td>Nam</td>
                                        }
                                        else
                                        {
                                            <td>Nữ</td>
                                        }
                                        <td>@item.Teacher.mobile</td>
                                        <td>@item.Teacher.address</td>
                                        @if (item.Teacher.userID.HasValue)
                                        {
                                            <td>@Html.ActionLink((string)item.Teacher.teacherName,
                                                                "Create", "PrivateMessage",
                                                                new { id = item.Teacher.userID }, new { a = "" })</td>
                                        }
                                        else
                                        {
                                            <td>GV chưa có tài khoản</td>
                                        }
                                    </tr>
                                }
                            </tbody>
                        </table>
                        <div id="pagersorter" class="pagersorter" style="clear: both;">
                            <form>
                                <img src="../../Content/images/first.png" class="first" />
                                <img src="../../Content/images/prev.png" class="prev" />
                                <input type="text" class="pagedisplay" />
                                <img src="../../Content/images/next.png" class="next" />
                                <img src="../../Content/images/last.png" class="last" />
                                <select class="pagesize">
                                    <option selected="selected" value="10">10</option>
                                    <option value="20">20</option>
                                    <option value="30">30</option>
                                    <option value="40">40</option>
                                </select>
                            </form>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
